package biz.ezcom.design.pattern.factory.method;

public class Client {
	public static void main(String[] args) {
		double numberA = 12.34;
		double numberB = 2;
		
		Factory factory = new FactoryAdd();
		Operator operator = factory.createOperator();
		double result = operator.getResult(numberA, numberB);
		System.out.println(result);
		
		factory = new FactorySub();
		operator = factory.createOperator();
		result = operator.getResult(numberA, numberB);
		System.out.println(result);
		
		factory = new FactoryMul();
		operator = factory.createOperator();
		result = operator.getResult(numberA, numberB);
		System.out.println(result);
		
		factory = new FactoryDiv();
		operator = factory.createOperator();
		result = operator.getResult(numberA, numberB);
		System.out.println(result);
	}
}
